<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"></script>
</head>
<body>
  <div id="app">
    <label for="name">用户名:</label><input type="text" name="" id="name" v-model='name'> 
    <br>
    <label for="psd">密码:&nbsp;&nbsp;&nbsp;</label><input type="text" name="" id="pad" v-model='password'>
    <br>
    <span>{{info}}</span>
    <br>
    <button @click=say>登录</button>
  </div>
  <script>
     const vm=new Vue({
      el:'#app',
      data:{name:"",password:"",info:""},
      methods:{
        say(){
          if(this.name=="admin"&&this.password==123456){
            this.info="登录成功"
          }else{
            this.info="登录失败"
          }
        }
      },
    })
  </script>
</body>
</html>